package br.com.datatraffic.fiscal.entidades;

// Generated 10/07/2009 10:49:54 by Hibernate Tools 3.2.0.b9

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * TipoCarroceria generated by hbm2java
 */
@Entity
@Table(name = "TBTIPO_CARROCERIA")
public class TipoCarroceria implements java.io.Serializable {

	private Long id;
	private String codigo;
	private String nome;
	private String descricao;
	private String sigla;
	private List<Ticket5> tickets = new ArrayList<Ticket5>(0);

	public TipoCarroceria() {
	}

	public TipoCarroceria(Long id) {
		this.id = id;
	}

	public TipoCarroceria(Long id, String codigo, String nome, String descricao, String sigla, List<Ticket5> tickets) {
		this.id = id;
		this.codigo = codigo;
		this.nome = nome;
		this.descricao = descricao;
		this.sigla = sigla;
		this.tickets = tickets;
	}

	@Id
	@GeneratedValue
	@Column(name = "TIPO_CARROCERIA_ID", unique = true, nullable = false, precision = 38, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "CODIGO", length = 50)
	public String getCodigo() {
		return this.codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}

	@Column(name = "NOME", length = 50)
	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@Column(name = "DESCRICAO", length = 100)
	public String getDescricao() {
		return this.descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	@Column(name = "SIGLA", length = 10)
	public String getSigla() {
		return this.sigla;
	}

	public void setSigla(String sigla) {
		this.sigla = sigla;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tipoCarroceria")
	public List<Ticket5> getTickets() {
		return this.tickets;
	}

	public void setTickets(List<Ticket5> tickets) {
		this.tickets = tickets;
	}

	// The following is extra code specified in the hbm.xml files
	private static final long serialVersionUID = 1L;
	// end of extra code specified in the hbm.xml files

}
